If you want to add to your form a combobox referencing another table follow next steps in the OnInitialUpdate() function:
The following example will show the name of the customers in the list and will update the CustId of the Orders table:
OpenCursor( "SELECT * FROM [Orders]"); |
OpenCursor( "SELECT Name,IdCust FROM [Customers] ORDER BY Name"); |
AddComboCtrl( IDC_CBO_CUST, "IdCust"); |
FillCombo( IDC_CBO_CUST, 1); |
NOTE: the Id field must be numeric in both tables, the main form table and the combo box table.